const LayoutBox = () => import(`@/components/layout`); //公共区域

let routesChildren = Array();

// import * as homePage from './homePage.js';
// import * as preview from './preview.js';
// import * as template from './template.js';
// import * as templateDetail from './templateDetail.js';
import tempView from "@/views/index"
import iframe from "@/views/iframe/index"
import error from "@/scenes/error"
import homePage from './homePage.js';
import preview from './preview.js';
import template from './template.js';
import templateDetail from './templateDetail.js';
routesChildren.push(...homePage.routes);
routesChildren.push(...preview.routes);
routesChildren.push(...template.routes);
routesChildren.push(...templateDetail.routes);

export default {
    routes: [
        {
            path: "*",
            name: "/error",
            meta: {
                title: "异常界面"
            },
            component: error
        },

        {
            path: `/`,
            redirect: "/home",
            component: LayoutBox,
            children: [
                ...routesChildren,
            ],
        },

        // 叫号业务&查询业务(特殊业务)
       

        {
            path: "/tempView",
            name: "tempView",
            meta: {
                title: "模板",
                keepAlive: false // 虽然这不是必须的，但可以明确表明不需要缓存
            },
            component:  tempView
        },

        {
            path: "/iframeIndex",
            name: "iframeIndex",
            meta: {
                title: "安卓入口",
                keepAlive: false // 虽然这不是必须的，但可以明确表明不需要缓存
            },
            component: iframe
        }
    ]
};
